package cn.wolfcode.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class QueryObject {

    private int currentPage = 1;
    private int pageSize = 10;

    private String keyword;
    
    /*
    * 重写getter方法
    * 用于矫正空串为null值
    * */
    public String getKeyword(){
        return StringUtils.hasLength(keyword)?keyword:null;
    }

}